#include"SList.h"


void SLtest01()
{
	SLTNode* node1 = (SLTNode*)malloc(sizeof(DataType));
	node1->data = 1;

	SLTNode* node2 = (SLTNode*)malloc(sizeof(DataType));
	node2->data = 2;

	SLTNode* node3 = (SLTNode*)malloc(sizeof(DataType));
	node3->data = 3;

	SLTNode* node4 = (SLTNode*)malloc(sizeof(DataType));
	node4->data = 4;

	node1->next = node2;
	node2->next = node3;
	node3->next = node4;
	node4->next = NULL;

	SLPrint(node1);
}

SLtest02()
{
	SLTNode* plist = NULL;
	PushBack(&plist, 1);
	PushBack(&plist, 2);
	PushBack(&plist, 3);
	PushBack(&plist, 4);
	SLPrint(plist);

	/*PushFront(&plist, 5);
	PushFront(&plist, 6);
	PushFront(&plist, 7);
	PushFront(&plist, 8);
	SLPrint(plist);*/

	PopBack(&plist);
	SLPrint(plist);
	/*PopBack(&plist);
	SLPrint(plist);
	PopBack(&plist);
	SLPrint(plist);
	PopBack(&plist);
	SLPrint(plist);*/
	
}

int main()
{
	//SLtest01();
	SLtest02();
	return 0;
}